package com.linjj.seckill.mapper;

import com.linjj.seckill.domain.User;
import com.linjj.seckill.vo.RegistVo;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Component;

@Component
@Mapper
public interface UserMapper {
    @Insert("insert into user(user_id,nickname,password,salt,register_time) values(#{phone},#{nickname},#{password},#{salt},SYSDATE()) ")
    public int insertUser(RegistVo registVo);
    @Select("select * from user where user_id = #{id}")
    public User getUserByPhone(@Param("id") String phone);
    @Update("update user set address=#{address} where user_id=#{userId}")
    public boolean updateUser(User user);
}
